# 来自实验二第三题

def is_leap_year(year: int) -> bool:
    if year % 400 == 0:
        return True
    if year % 4 == 0:
        return year % 100 != 0
    return False


def _main():
    input_str = input("请输入年份：")
    try:
        year = int(input_str)
    except ValueError:
        print("输入有误，请检查输入。")
        return
    result_string = "" if is_leap_year(year) else "不"
    print(f"{year} 年{result_string}是闰年。")


if __name__ == "__main__":
    _main()
    